package com.emm.yixun.openapi.hander;

import com.emm.yixun.common.app.CheckCustomerIntentionResDto;
import com.emm.yixun.openapi.dto.base.BaseRequestDTO;
import com.emm.yixun.openapi.dto.base.BaseResponseDTO;
import com.emm.yixun.openapi.hander.base.CommonAbstractHander;
import com.emm.yixun.openapi.vo.CheckCustomerIntentionReqVo;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2017/8/16.
 */
@Service
public class CheckCustomerIntentionHander extends CommonAbstractHander {

    @SuppressWarnings("rawtypes")
    @Override
    public BaseResponseDTO doBusiness(BaseRequestDTO reqDto) {
        // checkWay = 0.根据传入参数判断
        // checkWay = 1.认购，签约 从数据库中查询用户信息进行意向判断
        BaseResponseDTO<CheckCustomerIntentionResDto> res = new BaseResponseDTO<CheckCustomerIntentionResDto>();
        CheckCustomerIntentionResDto resDto = new CheckCustomerIntentionResDto();
        try {
            CheckCustomerIntentionReqVo cReqVo = (CheckCustomerIntentionReqVo) reqDto;
            resDto.setResult("0");
            res.setResData(resDto);
            return res;
        } catch (Throwable e) {
            resDto.setResult("0");
            resDto.setErrorMsg("验证客户信息异常");
            resDto.setErrorCode("10000");
            res.setResData(resDto);
            return res;
        }
    }

}
